package com.xiaol.ray.atomikosdemo.service;

/**
 * User: Ray.Shaw <p />
 * Time: 2019/10/28 17:52  <p />
 * Version: V1.0  <p />
 * Description:  <p />
 */

import com.xiaol.ray.atomikosdemo.entity.BookDO;
import com.xiaol.ray.atomikosdemo.entity.UserDO;

import java.util.List;

/**
 * 主要目的是测试分布式事务
 *
 */
public interface BookService {

    BookDO updateBook(BookDO book, UserDO user);

    /**
     * 保存
     *
     * @param book
     * @param user
     * @return
     */
    BookDO save(BookDO book, UserDO user);

    /**
     * 单条查询
     *
     * @param id
     * @return
     */
    BookDO get(Long id);

    /**
     * 分页查询
     *
     * @param page
     * @param size
     * @return
     */
    List<BookDO> list(Integer page, Integer size);

}
